__author__ = 'Perry'
import sys
from lib.format_time import *

def main():
    if len(sys.argv) >= 2:
        print len(sys.argv)
        print sys.argv[1]
        start_date = format_date(sys.argv[1])
        print "start_date = %s" %start_date
        end_date = format_date(sys.argv[2])
        print "end_date = %s" %end_date
        stat_date = start_date
        while stat_date>=start_date and stat_date<=end_date:
            print "The program of the date of %s is beginning at %s " %(stat_date,get_now())
            stat_date=var_date(stat_date)
            print "stat_date = %s" %stat_date
            print "The program of the date of %s is end at %s " %(stat_date,get_now())

    else:
        date = "2013-10-10"
        print date


if __name__ == '__main__':
    main()